package c.d.a.a.i;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.PathEffect;
import android.graphics.drawable.Drawable;
import c.d.a.a.f.a.c;
import c.d.a.a.f.b.d;
import c.d.a.a.j.f;
import c.d.a.a.j.g;
import c.d.a.a.j.h;
import com.github.mikephil.charting.charts.BarLineChartBase;
import com.github.mikephil.charting.data.Entry;
import com.huawei.hms.analytics.core.crypto.AesCipher.AesLen;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;

/* compiled from: LineChartRenderer */
public class e extends f {
    public c h;
    public Paint i;
    public WeakReference<Bitmap> j;
    public Canvas k;
    public Config l = Config.ARGB_8888;
    public Path m = new Path();
    public Path n = new Path();
    public float[] o = new float[4];
    public Path p = new Path();
    public HashMap<d, b> q = new HashMap();
    public float[] r = new float[2];

    /* compiled from: LineChartRenderer */
    public class b {
        public Path a = new Path();
        public Bitmap[] b;

        public b(a aVar) {
        }
    }

    public e(c cVar, c.d.a.a.a.a aVar, h hVar) {
        super(aVar, hVar);
        this.h = cVar;
        Paint paint = new Paint(1);
        this.i = paint;
        paint.setStyle(Style.FILL);
        this.i.setColor(-1);
    }

    public void b(Canvas canvas) {
        Canvas canvas2 = canvas;
        h hVar = this.a;
        int i = (int) hVar.c;
        int i2 = (int) hVar.d;
        WeakReference weakReference = this.j;
        Bitmap bitmap = weakReference == null ? null : (Bitmap) weakReference.get();
        if (!(bitmap != null && bitmap.getWidth() == i && bitmap.getHeight() == i2)) {
            if (i > 0 && i2 > 0) {
                bitmap = Bitmap.createBitmap(i, i2, this.l);
                this.j = new WeakReference(bitmap);
                this.k = new Canvas(bitmap);
            } else {
                return;
            }
        }
        Bitmap bitmap2 = bitmap;
        bitmap2.eraseColor(0);
        Iterator it = this.h.getLineData().i.iterator();
        while (it.hasNext()) {
            Bitmap bitmap3;
            Iterator it2;
            c.d.a.a.f.b.e eVar = (c.d.a.a.f.b.e) it.next();
            if (!eVar.isVisible() || eVar.i0() < 1) {
                bitmap3 = bitmap2;
                it2 = it;
            } else {
                PathEffect pathEffect;
                this.c.setStrokeWidth(eVar.B());
                this.c.setPathEffect(eVar.a0());
                i2 = eVar.x0().ordinal();
                f a;
                Entry q0;
                int i3;
                Entry entry;
                c.d.a.a.i.b.a aVar;
                if (i2 == 2) {
                    bitmap3 = bitmap2;
                    it2 = it;
                    Objects.requireNonNull(this.b);
                    a = ((BarLineChartBase) this.h).a(eVar.e0());
                    this.f.a(this.h, eVar);
                    float X = eVar.X();
                    this.m.reset();
                    c.d.a.a.i.b.a aVar2 = this.f;
                    if (aVar2.c >= 1) {
                        i = aVar2.a + 1;
                        q0 = eVar.q0(Math.max(i - 2, 0));
                        Entry q02 = eVar.q0(Math.max(i - 1, 0));
                        if (q02 != null) {
                            this.m.moveTo(q02.b(), q02.a() * 1.0f);
                            int i4 = this.f.a + 1;
                            i3 = -1;
                            entry = q02;
                            while (true) {
                                c.d.a.a.i.b.a aVar3 = this.f;
                                if (i4 > aVar3.c + aVar3.a) {
                                    break;
                                }
                                if (i3 != i4) {
                                    q02 = eVar.q0(i4);
                                }
                                i3 = i4 + 1;
                                if (i3 < eVar.i0()) {
                                    i4 = i3;
                                }
                                Entry q03 = eVar.q0(i4);
                                this.m.cubicTo(entry.b() + ((q02.b() - q0.b()) * X), (entry.a() + ((q02.a() - q0.a()) * X)) * 1.0f, q02.b() - ((q03.b() - entry.b()) * X), (q02.a() - ((q03.a() - entry.a()) * X)) * 1.0f, q02.b(), q02.a() * 1.0f);
                                q0 = entry;
                                entry = q02;
                                q02 = q03;
                                int i5 = i3;
                                i3 = i4;
                                i4 = i5;
                            }
                        }
                    }
                    if (eVar.t0()) {
                        this.n.reset();
                        this.n.addPath(this.m);
                        m(this.k, eVar, this.n, a, this.f);
                    }
                    this.c.setColor(eVar.l0());
                    this.c.setStyle(Style.STROKE);
                    a.d(this.m);
                    this.k.drawPath(this.m, this.c);
                    pathEffect = null;
                    this.c.setPathEffect(null);
                    this.c.setPathEffect(pathEffect);
                } else if (i2 != 3) {
                    int i6;
                    int i7;
                    int i8;
                    c.d.a.a.c.g.a aVar4 = c.d.a.a.c.g.a.STEPPED;
                    i3 = eVar.i0();
                    Object obj = eVar.x0() == aVar4 ? 1 : null;
                    int i9 = obj != null ? 4 : 2;
                    a = ((BarLineChartBase) this.h).a(eVar.e0());
                    Objects.requireNonNull(this.b);
                    this.c.setStyle(Style.STROKE);
                    Canvas canvas3 = eVar.H() ? this.k : canvas2;
                    this.f.a(this.h, eVar);
                    if (!eVar.t0() || i3 <= 0) {
                        i6 = i3;
                        bitmap3 = bitmap2;
                        it2 = it;
                    } else {
                        aVar = this.f;
                        Path path = this.p;
                        int i10 = aVar.a;
                        i7 = aVar.c + i10;
                        i = 0;
                        while (true) {
                            int i11;
                            c.d.a.a.c.g.a aVar5;
                            i8 = (i * AesLen.ROOTKEY_COMPONET_LEN) + i10;
                            int i12 = i10;
                            i10 = i8 + AesLen.ROOTKEY_COMPONET_LEN;
                            if (i10 > i7) {
                                i10 = i7;
                            }
                            if (i8 <= i10) {
                                i11 = i7;
                                it2 = it;
                                float a2 = eVar.r().a(eVar, this.h);
                                Objects.requireNonNull(this.b);
                                Object obj2 = eVar.x0() == aVar4 ? 1 : null;
                                path.reset();
                                c.d.a.a.c.c q04 = eVar.q0(i8);
                                aVar5 = aVar4;
                                path.moveTo(q04.b(), a2);
                                bitmap3 = bitmap2;
                                float f = 1.0f;
                                path.lineTo(q04.b(), q04.a() * 1.0f);
                                i2 = i8 + 1;
                                Entry entry2 = null;
                                while (i2 <= i10) {
                                    Object obj3;
                                    c.d.a.a.c.c entry22 = eVar.q0(i2);
                                    if (obj2 != null) {
                                        obj3 = obj2;
                                        i6 = i3;
                                        path.lineTo(entry22.b(), q04.a() * f);
                                    } else {
                                        i6 = i3;
                                        obj3 = obj2;
                                    }
                                    path.lineTo(entry22.b(), entry22.a() * f);
                                    i2++;
                                    q04 = entry22;
                                    obj2 = obj3;
                                    i3 = i6;
                                    f = 1.0f;
                                }
                                i6 = i3;
                                if (entry22 != null) {
                                    path.lineTo(entry22.b(), a2);
                                }
                                path.close();
                                a.d(path);
                                Drawable d0 = eVar.d0();
                                if (d0 != null) {
                                    l(canvas2, path, d0);
                                } else {
                                    k(canvas2, path, eVar.h(), eVar.l());
                                }
                            } else {
                                aVar5 = aVar4;
                                i11 = i7;
                                i6 = i3;
                                bitmap3 = bitmap2;
                                it2 = it;
                            }
                            i++;
                            if (i8 > i10) {
                                break;
                            }
                            i10 = i12;
                            i7 = i11;
                            it = it2;
                            aVar4 = aVar5;
                            bitmap2 = bitmap3;
                            i3 = i6;
                        }
                    }
                    if (eVar.y().size() > 1) {
                        i = i9 * 2;
                        if (this.o.length <= i) {
                            this.o = new float[(i9 * 4)];
                        }
                        i2 = this.f.a;
                        while (true) {
                            aVar = this.f;
                            if (i2 > aVar.c + aVar.a) {
                                break;
                            }
                            q0 = eVar.q0(i2);
                            if (q0 != null) {
                                this.o[0] = q0.b();
                                this.o[1] = q0.a() * 1.0f;
                                if (i2 < this.f.b) {
                                    q0 = eVar.q0(i2 + 1);
                                    if (q0 == null) {
                                        break;
                                    }
                                    if (obj != null) {
                                        this.o[2] = q0.b();
                                        float[] fArr = this.o;
                                        fArr[3] = fArr[1];
                                        fArr[4] = fArr[2];
                                        fArr[5] = fArr[3];
                                        fArr[6] = q0.b();
                                        this.o[7] = q0.a() * 1.0f;
                                    } else {
                                        this.o[2] = q0.b();
                                        this.o[3] = q0.a() * 1.0f;
                                    }
                                    i8 = 0;
                                } else {
                                    float[] fArr2 = this.o;
                                    i8 = 0;
                                    fArr2[2] = fArr2[0];
                                    fArr2[3] = fArr2[1];
                                }
                                a.f(this.o);
                                if (!this.a.g(this.o[i8])) {
                                    break;
                                } else if (this.a.f(this.o[2])) {
                                    if (!this.a.h(this.o[1])) {
                                        if (!this.a.e(this.o[3])) {
                                            i2++;
                                        }
                                    }
                                    this.c.setColor(eVar.A0(i2));
                                    canvas3.drawLines(this.o, 0, i, this.c);
                                    i2++;
                                }
                            }
                            i2++;
                        }
                    } else {
                        i3 = i6 * i9;
                        if (this.o.length < Math.max(i3, i9) * 2) {
                            this.o = new float[(Math.max(i3, i9) * 4)];
                        }
                        if (eVar.q0(this.f.a) != null) {
                            i2 = this.f.a;
                            i = 0;
                            while (true) {
                                aVar = this.f;
                                if (i2 > aVar.c + aVar.a) {
                                    break;
                                }
                                q0 = eVar.q0(i2 == 0 ? 0 : i2 - 1);
                                entry = eVar.q0(i2);
                                if (!(q0 == null || entry == null)) {
                                    int i13 = i + 1;
                                    this.o[i] = q0.b();
                                    i3 = i13 + 1;
                                    this.o[i13] = q0.a() * 1.0f;
                                    if (obj != null) {
                                        i13 = i3 + 1;
                                        this.o[i3] = entry.b();
                                        i3 = i13 + 1;
                                        this.o[i13] = q0.a() * 1.0f;
                                        i13 = i3 + 1;
                                        this.o[i3] = entry.b();
                                        i3 = i13 + 1;
                                        this.o[i13] = q0.a() * 1.0f;
                                    }
                                    i7 = i3 + 1;
                                    this.o[i3] = entry.b();
                                    i3 = i7 + 1;
                                    this.o[i7] = entry.a() * 1.0f;
                                    i = i3;
                                }
                                i2++;
                            }
                            if (i > 0) {
                                a.f(this.o);
                                i2 = Math.max((this.f.c + 1) * i9, i9) * 2;
                                this.c.setColor(eVar.l0());
                                canvas3.drawLines(this.o, 0, i2, this.c);
                            }
                        }
                    }
                    this.c.setPathEffect(null);
                } else {
                    bitmap3 = bitmap2;
                    it2 = it;
                    Objects.requireNonNull(this.b);
                    a = ((BarLineChartBase) this.h).a(eVar.e0());
                    this.f.a(this.h, eVar);
                    this.m.reset();
                    c.d.a.a.i.b.a aVar6 = this.f;
                    if (aVar6.c >= 1) {
                        Entry q05 = eVar.q0(aVar6.a);
                        this.m.moveTo(q05.b(), q05.a() * 1.0f);
                        i = this.f.a + 1;
                        while (true) {
                            aVar = this.f;
                            if (i > aVar.c + aVar.a) {
                                break;
                            }
                            q0 = eVar.q0(i);
                            float b = ((q0.b() - q05.b()) / 2.0f) + q05.b();
                            this.m.cubicTo(b, q05.a() * 1.0f, b, q0.a() * 1.0f, q0.b(), q0.a() * 1.0f);
                            i++;
                            q05 = q0;
                        }
                    }
                    if (eVar.t0()) {
                        this.n.reset();
                        this.n.addPath(this.m);
                        m(this.k, eVar, this.n, a, this.f);
                    }
                    this.c.setColor(eVar.l0());
                    this.c.setStyle(Style.STROKE);
                    a.d(this.m);
                    this.k.drawPath(this.m, this.c);
                    this.c.setPathEffect(null);
                }
                pathEffect = null;
                this.c.setPathEffect(pathEffect);
            }
            it = it2;
            bitmap2 = bitmap3;
        }
        canvas2.drawBitmap(bitmap2, 0.0f, 0.0f, this.c);
    }

    /* JADX WARNING: Removed duplicated region for block: B:35:0x00bb  */
    /* JADX WARNING: Removed duplicated region for block: B:46:0x0130  */
    public void c(android.graphics.Canvas r20) {
        /*
        r19 = this;
        r0 = r19;
        r1 = r0.c;
        r2 = android.graphics.Paint.Style.FILL;
        r1.setStyle(r2);
        r1 = r0.b;
        java.util.Objects.requireNonNull(r1);
        r1 = r0.r;
        r2 = 0;
        r3 = 0;
        r1[r2] = r3;
        r4 = 1;
        r1[r4] = r3;
        r1 = r0.h;
        r1 = r1.getLineData();
        r1 = r1.i;
        r5 = 0;
    L_0x0020:
        r6 = r1.size();
        if (r5 >= r6) goto L_0x01a7;
    L_0x0026:
        r6 = r1.get(r5);
        r6 = (c.d.a.a.f.b.e) r6;
        r7 = r6.isVisible();
        if (r7 == 0) goto L_0x019c;
    L_0x0032:
        r7 = r6.m0();
        if (r7 == 0) goto L_0x019c;
    L_0x0038:
        r7 = r6.i0();
        if (r7 != 0) goto L_0x0040;
    L_0x003e:
        goto L_0x019c;
    L_0x0040:
        r7 = r0.i;
        r8 = r6.M();
        r7.setColor(r8);
        r7 = r0.h;
        r8 = r6.e0();
        r7 = (com.github.mikephil.charting.charts.BarLineChartBase) r7;
        r7 = r7.a(r8);
        r8 = r0.f;
        r9 = r0.h;
        r8.a(r9, r6);
        r8 = r6.s0();
        r9 = r6.r0();
        r10 = r6.z0();
        if (r10 == 0) goto L_0x0074;
    L_0x006a:
        r10 = (r9 > r8 ? 1 : (r9 == r8 ? 0 : -1));
        if (r10 >= 0) goto L_0x0074;
    L_0x006e:
        r9 = (r9 > r3 ? 1 : (r9 == r3 ? 0 : -1));
        if (r9 <= 0) goto L_0x0074;
    L_0x0072:
        r9 = 1;
        goto L_0x0075;
    L_0x0074:
        r9 = 0;
    L_0x0075:
        if (r9 == 0) goto L_0x0082;
    L_0x0077:
        r10 = r6.M();
        r11 = 1122867; // 0x112233 float:1.573472E-39 double:5.5477E-318;
        if (r10 != r11) goto L_0x0082;
    L_0x0080:
        r10 = 1;
        goto L_0x0083;
    L_0x0082:
        r10 = 0;
    L_0x0083:
        r11 = r0.q;
        r11 = r11.containsKey(r6);
        r12 = 0;
        if (r11 == 0) goto L_0x0095;
    L_0x008c:
        r11 = r0.q;
        r11 = r11.get(r6);
        r11 = (c.d.a.a.i.e.b) r11;
        goto L_0x009f;
    L_0x0095:
        r11 = new c.d.a.a.i.e$b;
        r11.m1144init(r12);
        r13 = r0.q;
        r13.put(r6, r11);
    L_0x009f:
        java.util.Objects.requireNonNull(r11);
        r13 = r6.g();
        r14 = r11.b;
        if (r14 != 0) goto L_0x00af;
    L_0x00aa:
        r13 = new android.graphics.Bitmap[r13];
        r11.b = r13;
        goto L_0x00b6;
    L_0x00af:
        r14 = r14.length;
        if (r14 == r13) goto L_0x00b8;
    L_0x00b2:
        r13 = new android.graphics.Bitmap[r13];
        r11.b = r13;
    L_0x00b6:
        r13 = 1;
        goto L_0x00b9;
    L_0x00b8:
        r13 = 0;
    L_0x00b9:
        if (r13 == 0) goto L_0x0125;
    L_0x00bb:
        r13 = r6.g();
        r14 = r6.s0();
        r15 = r6.r0();
        r3 = 0;
    L_0x00c8:
        if (r3 >= r13) goto L_0x0125;
    L_0x00ca:
        r12 = android.graphics.Bitmap.Config.ARGB_4444;
        r16 = r5;
        r4 = (double) r14;
        r17 = 4611911198408756429; // 0x4000cccccccccccd float:-1.07374184E8 double:2.1;
        r4 = r4 * r17;
        r4 = (int) r4;
        r4 = android.graphics.Bitmap.createBitmap(r4, r4, r12);
        r5 = new android.graphics.Canvas;
        r5.<init>(r4);
        r12 = r11.b;
        r12[r3] = r4;
        r4 = c.d.a.a.i.e.this;
        r4 = r4.c;
        r12 = r6.b0(r3);
        r4.setColor(r12);
        if (r10 == 0) goto L_0x010e;
    L_0x00f1:
        r4 = r11.a;
        r4.reset();
        r4 = r11.a;
        r12 = android.graphics.Path.Direction.CW;
        r4.addCircle(r14, r14, r14, r12);
        r4 = r11.a;
        r12 = android.graphics.Path.Direction.CCW;
        r4.addCircle(r14, r14, r15, r12);
        r4 = r11.a;
        r12 = c.d.a.a.i.e.this;
        r12 = r12.c;
        r5.drawPath(r4, r12);
        goto L_0x011e;
    L_0x010e:
        r4 = c.d.a.a.i.e.this;
        r4 = r4.c;
        r5.drawCircle(r14, r14, r14, r4);
        if (r9 == 0) goto L_0x011e;
    L_0x0117:
        r4 = c.d.a.a.i.e.this;
        r4 = r4.i;
        r5.drawCircle(r14, r14, r15, r4);
    L_0x011e:
        r3 = r3 + 1;
        r5 = r16;
        r4 = 1;
        r12 = 0;
        goto L_0x00c8;
    L_0x0125:
        r16 = r5;
        r3 = r0.f;
        r4 = r3.c;
        r3 = r3.a;
        r4 = r4 + r3;
    L_0x012e:
        if (r3 > r4) goto L_0x0198;
    L_0x0130:
        r5 = r6.q0(r3);
        if (r5 != 0) goto L_0x0137;
    L_0x0136:
        goto L_0x0198;
    L_0x0137:
        r9 = r0.r;
        r10 = r5.b();
        r9[r2] = r10;
        r9 = r0.r;
        r5 = r5.a();
        r10 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;
        r5 = r5 * r10;
        r10 = 1;
        r9[r10] = r5;
        r5 = r0.r;
        r7.f(r5);
        r5 = r0.a;
        r9 = r0.r;
        r9 = r9[r2];
        r5 = r5.g(r9);
        if (r5 != 0) goto L_0x015e;
    L_0x015d:
        goto L_0x0198;
    L_0x015e:
        r5 = r0.a;
        r9 = r0.r;
        r9 = r9[r2];
        r5 = r5.f(r9);
        if (r5 == 0) goto L_0x0191;
    L_0x016a:
        r5 = r0.a;
        r9 = r0.r;
        r10 = 1;
        r9 = r9[r10];
        r5 = r5.j(r9);
        if (r5 != 0) goto L_0x0178;
    L_0x0177:
        goto L_0x0191;
    L_0x0178:
        r5 = r11.b;
        r9 = r5.length;
        r9 = r3 % r9;
        r5 = r5[r9];
        if (r5 == 0) goto L_0x0191;
    L_0x0181:
        r9 = r0.r;
        r10 = r9[r2];
        r10 = r10 - r8;
        r12 = 1;
        r9 = r9[r12];
        r9 = r9 - r8;
        r13 = r20;
        r14 = 0;
        r13.drawBitmap(r5, r10, r9, r14);
        goto L_0x0195;
    L_0x0191:
        r13 = r20;
        r12 = 1;
        r14 = 0;
    L_0x0195:
        r3 = r3 + 1;
        goto L_0x012e;
    L_0x0198:
        r13 = r20;
    L_0x019a:
        r12 = 1;
        goto L_0x01a1;
    L_0x019c:
        r13 = r20;
        r16 = r5;
        goto L_0x019a;
    L_0x01a1:
        r5 = r16 + 1;
        r3 = 0;
        r4 = 1;
        goto L_0x0020;
    L_0x01a7:
        return;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.d.a.a.i.e.c(android.graphics.Canvas):void");
    }

    public void d(Canvas canvas, c.d.a.a.e.b[] bVarArr) {
        c.d.a.a.c.f lineData = this.h.getLineData();
        for (c.d.a.a.e.b bVar : bVarArr) {
            c.d.a.a.f.b.e eVar = (c.d.a.a.f.b.e) lineData.c(bVar.f);
            if (eVar != null && eVar.n0()) {
                Entry D = eVar.D(bVar.a, bVar.b);
                if (h(D, eVar)) {
                    f a = ((BarLineChartBase) this.h).a(eVar.e0());
                    float b = D.b();
                    float a2 = D.a();
                    Objects.requireNonNull(this.b);
                    c.d.a.a.j.c a3 = a.a(b, a2 * 1.0f);
                    double d = a3.b;
                    float f = (float) d;
                    double d2 = a3.c;
                    a2 = (float) d2;
                    bVar.i = f;
                    bVar.j = a2;
                    j(canvas, (float) d, (float) d2, eVar);
                }
            }
        }
    }

    public void e(Canvas canvas) {
        if (g(this.h)) {
            List list = this.h.getLineData().i;
            for (int i = 0; i < list.size(); i++) {
                c.d.a.a.f.b.e eVar = (c.d.a.a.f.b.e) list.get(i);
                Canvas canvas2;
                if (!i(eVar) || eVar.i0() < 1) {
                    canvas2 = canvas;
                } else {
                    a(eVar);
                    f a = ((BarLineChartBase) this.h).a(eVar.e0());
                    int s0 = (int) (eVar.s0() * 1.75f);
                    if (!eVar.m0()) {
                        s0 /= 2;
                    }
                    this.f.a(this.h, eVar);
                    Objects.requireNonNull(this.b);
                    Objects.requireNonNull(this.b);
                    c.d.a.a.i.b.a aVar = this.f;
                    int i2 = aVar.a;
                    int i3 = (((int) (((float) (aVar.b - i2)) * 1.0f)) + 1) * 2;
                    if (a.d.length != i3) {
                        a.d = new float[i3];
                    }
                    float[] fArr = a.d;
                    for (int i4 = 0; i4 < i3; i4 += 2) {
                        Entry q0 = eVar.q0((i4 / 2) + i2);
                        if (q0 != null) {
                            fArr[i4] = q0.b();
                            fArr[i4 + 1] = q0.a() * 1.0f;
                        } else {
                            fArr[i4] = 0.0f;
                            fArr[i4 + 1] = 0.0f;
                        }
                    }
                    a.g.set(a.a);
                    a.g.postConcat(a.c.a);
                    a.g.postConcat(a.b);
                    a.g.mapPoints(fArr);
                    c.d.a.a.d.e h0 = eVar.h0();
                    c.d.a.a.j.d c = c.d.a.a.j.d.c(eVar.j0());
                    c.b = g.d(c.b);
                    c.c = g.d(c.c);
                    for (i2 = 0; i2 < fArr.length; i2 += 2) {
                        float f = fArr[i2];
                        float f2 = fArr[i2 + 1];
                        if (!this.a.g(f)) {
                            break;
                        }
                        if (this.a.f(f) && this.a.j(f2)) {
                            int i5 = i2 / 2;
                            Entry q02 = eVar.q0(this.f.a + i5);
                            if (eVar.V()) {
                                Objects.requireNonNull(h0);
                                String a2 = h0.a(q02.a());
                                f2 -= (float) s0;
                                this.e.setColor(eVar.s(i5));
                                canvas.drawText(a2, f, f2, this.e);
                            } else {
                                canvas2 = canvas;
                            }
                            Objects.requireNonNull(q02);
                        } else {
                            canvas2 = canvas;
                        }
                    }
                    canvas2 = canvas;
                    c.d.a.a.j.d.d.c(c);
                }
            }
        }
    }

    public void f() {
    }

    public void m(Canvas canvas, c.d.a.a.f.b.e eVar, Path path, f fVar, c.d.a.a.i.b.a aVar) {
        float a = eVar.r().a(eVar, this.h);
        path.lineTo(eVar.q0(aVar.a + aVar.c).b(), a);
        path.lineTo(eVar.q0(aVar.a).b(), a);
        path.close();
        fVar.d(path);
        Drawable d0 = eVar.d0();
        if (d0 != null) {
            l(canvas, path, d0);
        } else {
            k(canvas, path, eVar.h(), eVar.l());
        }
    }
}
